﻿/*****************************************
 * 
 *  copyright (c) by ylshen
 * 
 *  author : ylshen (syl.lucky@gmail.com)
 *  
 *  created at : 08-05-21
 * 
 **************************************** */

using System;
using System.Collections.Generic;
using System.Text;

namespace JYStockAnalyser.Model
{
    /// <summary>
    /// 机器唯一号
    /// </summary>
    [Serializable]
    public class ComputerUniqueNO
    {
        /// <summary>
        /// CPU编号
        /// </summary>
        public string CPU_NO;
        /// <summary>
        /// 硬盘编号
        /// </summary>
        public string DISK_NO;
        /// <summary>
        /// 
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public override bool Equals(object obj)
        {
            if (obj == null)
                return false;
            if (obj.GetType() != this.GetType())
                return false;
            ComputerUniqueNO other = obj as ComputerUniqueNO;
            //return other.CPU_NO.Equals(this.CPU_NO) && other.DISK_NO.Equals(this.DISK_NO);
            return other.CPU_NO.Equals(this.CPU_NO);
        }

        public override int GetHashCode()
        {
            return CPU_NO.GetHashCode();
        }
    }
}
